Kindle で電子書籍を買うときの配信先デバイスを自動選択する Userscript
Kindle で買うときのデフォルトの配信先のデバイスを選べなくて、いつも一手間かけてデバイスを選択することになるので「やだ〜」となってこうした。
code:kindle-device-selecter.js
// ==UserScript==
// @name Kindle Device Selecter
// @namespace https://june29.jp/
// @version 1.0.0
// @description Select my main device automatically.
// @author Jun OHWADA
// @include https://www.amazon.co.jp/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var select = document.getElementsByName("target-fiona.0")0;
if (select == undefined) {
return;
}
var option = select.getElementsByTagName("option")2;
if (option == undefined) {
return;
}
option.selected = true;
})();